﻿using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Localization;

namespace CollegeShop.Repository.Win.DevHelper
{
    class LocalizationCHS : DevExpress.XtraEditors.Controls.Localizer
    {
        public override string GetLocalizedString(DevExpress.XtraEditors.Controls.StringId id)
        {
            switch (id)
            {
                case StringId.XtraMessageBoxCancelButtonText:
                    return "取消";
                case StringId.XtraMessageBoxOkButtonText:
                    return "确定";
                case StringId.XtraMessageBoxYesButtonText:
                    return "是";
                case StringId.XtraMessageBoxNoButtonText:
                    return "否";
                case StringId.XtraMessageBoxIgnoreButtonText:
                    return "忽略";
                case StringId.XtraMessageBoxAbortButtonText:
                    return "中止";
                case StringId.XtraMessageBoxRetryButtonText:
                    return "重试";
                case StringId.TextEditMenuCopy: 
                    return "复制(&C)";
                case StringId.TextEditMenuCut:
                    return "剪切(&X)";
                case StringId.TextEditMenuDelete:
                    return "删除(&D)";
                case StringId.TextEditMenuPaste:
                    return "粘贴(&V)";
                case StringId.TextEditMenuSelectAll:
                    return "全选(&A)";
                case StringId.TextEditMenuUndo:
                    return "撤销(&Z)";
                case StringId.DateEditToday:
                    return "今天";
                case StringId.DateEditClear:
                    return "清空";
                default:
                    return base.GetLocalizedString(id);
            }
        }
    }

    public class DevLocalizer : GridLocalizer
    {
        public override string Language { get { return "Chinese"; } }
        public override string GetLocalizedString(GridStringId id)
        {
            switch (id)
            {
                case GridStringId.MenuColumnRemoveColumn:
                    return "不显示此列";
                case GridStringId.MenuColumnFilterEditor:
                    return "编辑过虑器";
                case GridStringId.MenuColumnAutoFilterRowHide:// = 89,
                    return "隐藏自动过虑行";
                case GridStringId.MenuColumnAutoFilterRowShow:// = 90,
                    return "显示自动过虑行";
                case GridStringId.FindControlClearButton:
                    return "清空";
                case GridStringId.FindControlFindButton:
                    return "查找";
                case GridStringId.FileIsNotFoundError:
                    return "文件{0}没有找到";
                case GridStringId.ColumnViewExceptionMessage:
                    return "是否确定修改？";
                case GridStringId.CustomizationCaption:
                    return "自定义显示字段";
                case GridStringId.CustomizationColumns:
                    return "列";
                case GridStringId.CustomizationBands:
                    return "分区";
                case GridStringId.PopupFilterAll:
                    return "(所有)";
                case GridStringId.PopupFilterCustom:
                    return "(自定义)";
                case GridStringId.PopupFilterBlanks:
                    return "(空值)";
                case GridStringId.PopupFilterNonBlanks:
                    return "(非空值)";
                case GridStringId.CustomFilterDialogFormCaption:
                    return "自定义筛选条件";
                case GridStringId.CustomFilterDialogCaption:
                    return "条件为:";
                case GridStringId.CustomFilterDialogRadioAnd:
                    return "并且";
                case GridStringId.CustomFilterDialogRadioOr:
                    return "或者";
                case GridStringId.CustomFilterDialogOkButton:
                    return "确定(&O)";
                case GridStringId.CustomFilterDialogClearFilter:
                    return "清除筛选条件(&L)";
                case GridStringId.CustomFilterDialog2FieldCheck:
                    return "字段";
                case GridStringId.CustomFilterDialogCancelButton:
                    return "取消(&C)";
                case GridStringId.MenuGroupPanelShow:
                    return "显示分组列头";
                case GridStringId.MenuColumnFindFilterHide:// = 91,
                    return "隐藏查找面板";
                case GridStringId.MenuColumnFindFilterShow://= 92,
                    return "显示查找面板";
                case GridStringId.MenuGroupPanelHide:
                    return "隐藏分组列头";
                case GridStringId.MenuFooterSum:
                    return "合计";
                case GridStringId.MenuFooterMin:
                    return "最小";
                case GridStringId.MenuFooterMax:
                    return "最大";
                case GridStringId.MenuFooterCount:
                    return "计数";
                case GridStringId.MenuFooterAverage:
                    return "平均";
                case GridStringId.MenuFooterNone:
                    return "空";
                case GridStringId.MenuFooterSumFormat:
                    return "合计={0:#.##}";
                case GridStringId.MenuFooterMinFormat:
                    return "最小={0}";
                case GridStringId.MenuFooterMaxFormat:
                    return "最大={0}";
                case GridStringId.MenuFooterCountFormat:
                    return "{0}";
                case GridStringId.MenuFooterAverageFormat:
                    return "平均={0:#.##}";
                case GridStringId.MenuColumnSortAscending:
                    return "升序排序";
                case GridStringId.MenuColumnSortDescending:
                    return "降序排序";
                case GridStringId.MenuColumnGroup:
                    return "按此列分组";
                case GridStringId.MenuColumnUnGroup:
                    return "取消分组";
                case GridStringId.MenuColumnColumnCustomization:
                    return "显示/隐藏字段";
                case GridStringId.MenuColumnBestFit:
                    return "自动调整字段宽度";
                case GridStringId.MenuColumnFilter:
                    return "筛选";
                case GridStringId.MenuColumnClearFilter:
                    return "清除筛选条件";
                case GridStringId.MenuColumnBestFitAllColumns:
                    return "自动调整所有字段宽度";
                case GridStringId.MenuGroupPanelFullExpand:
                    return "展开全部分组";
                case GridStringId.MenuGroupPanelFullCollapse:
                    return "收缩全部分组";
                case GridStringId.MenuGroupPanelClearGrouping:
                    return "清除所有分组";
                case GridStringId.PrintDesignerGridView:
                    return "打印设置(表格模式)";
                case GridStringId.PrintDesignerCardView:
                    return "打印设置(卡片模式)";
                case GridStringId.PrintDesignerBandedView:
                    return "打印设置(区域模式)";
                case GridStringId.PrintDesignerBandHeader:
                    return "区标题";
                case GridStringId.MenuColumnGroupBox:
                    return "显示/隐藏分组区";
                case GridStringId.CardViewNewCard:
                    return "新卡片";
                case GridStringId.CardViewQuickCustomizationButton:
                    return "自定义格式";
                case GridStringId.CardViewQuickCustomizationButtonFilter:
                    return "筛选";
                case GridStringId.CardViewQuickCustomizationButtonSort:
                    return "排序:";
                case GridStringId.GridGroupPanelText:
                    return "拖动列标题到这进行分组";
                case GridStringId.GridNewRowText:
                    return "新增资料";
                case GridStringId.GridOutlookIntervals:
                    return "一个月以上;上个月;三周前;两周前;上周;;;;;;;;昨天;今天;明天; ;;;;;;;下周;两周后;三周后;下个月;一个月之后;";
                case GridStringId.PrintDesignerDescription:
                    return "为当前视图设置不同的打印选项.";
                case GridStringId.MenuFooterCustomFormat:
                    return "自定={0}";
                case GridStringId.MenuFooterCountGroupFormat:
                    return "计数={0}";
                case GridStringId.MenuColumnClearSorting:
                    return "清除排序";
                default:
                    break;
            }
            return base.GetLocalizedString(id);
        }
    }
}
